<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="referrer" content="origin" />
    <meta property="og:description" content="" />
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title></title>
    <style></style>
    <script src="./js/components/dialog.mjs"></script>
    <style>
        button {
            background-color: red;
        }
    </style>
</head>

<body>
    <a href="./ace/">ace</a>
    <a href="./mdnote/editor.html">mdnote</a>

    <x-modal title="Important!">
        <p>This is some really important stuff</p>
    </x-modal>

    <a onclick="alert()">alert</a>
    <a onclick="confirm()">confirm</a>
    <a onclick="show()">show</a>
</body>
<script>
    var alert = function() {
        document.querySelector('x-modal').alert('保存成功', (e) => {
            //alert('clicked');
            console.log(e);
        });
    };
    var confirm = function() {
        document.querySelector('x-modal').confirm('提示', '保存成功', (e) => {
            //alert('clicked');
            console.log(e);
        });
    };
    var show = function() {
        document.querySelector('x-modal').show({
            title: '提示',
            content: `<iframe></iframe>`
        }, (e) => {
            //alert('clicked');
            console.log(e);
        });
    };
</script>

</html>